#definition
import math
result = []
result_tmp = []

f = open('WIDE')
fw = open('data_prepared_daily','w')

step = 2
separator = ' '
dimensions = (1,1)

for line in f:
    line = line.replace('\n','')
    line = line.strip(separator)
    line = line.split(separator)
    line = line[0]
    if line:
        result_tmp.append(line)

for number in xrange(len(result_tmp)-step+1):
    line = result_tmp[number:number+step]
    add = lambda x :  str(float(x) + 3)
   #line = map(add,line)
    line.insert(0 , str(number % 7))
    line = ','.join(line)+'\n'
    result.append(line)
#for i in range(1,2000):
#    func = lambda x: str(abs(math.sin(x))**x * math.cos(x))
#    line = [func(i/100.0), func((i+1)/100.0)]
#    line = ','.join(line)+'\n'
#    result.append(line)

fw.writelines(result)

print 'i/o >',str(len(result_tmp)) + '/' + str(len(result))

f.close()
fw.close()